/*
 * B.cpp
 *
 *  Created on: 2014-2-12
 *      Author: cjrzh
 */

#include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<algorithm>
const int maxn=100005;
long long a[maxn],b[maxn];
using namespace std;
int main()
{
	int n;
	long long ans=0;
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=1;i<=n;i++)
		cin>>b[i];
	for(int i=1;i<=n;i++)
	{
		if(2*a[i]<b[i]||b[i]==1)
			ans--;
		else if(b[i]%2==0)
			ans+=b[i]*b[i]/4;
		else
			ans+=(b[i]/2)*(b[i]/2+1);
	}
	cout<<ans<<endl;
	return 0;
}
